package com.bravo.search.entity;
import	java.io.Serializable;

/**
 * @author: Yuyong
 * @create: 2019-08-06 11:03
 **/

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * 文章实体类
 */
@Document(indexName = "bravoindex",type = "article")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Article implements Serializable{

    /**
     * ID
     */
    @Id
    private String id;

    /**
     * 文章标题
     */
    @Field(index = true,type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String title;

    /**
     * 文章正文
     */
    @Field(index = true,type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String content;

    /**
     * 审核状态
     */
    private String state;
}
